<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 华哥
  Date: 2021/5/11
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>湖南省长沙市华子医院</title>
    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <style type="text/css">
        *{
            margin: 0;
        }
        .head{
            width: 100%;
            background: url("<%=basePath%>docdorLogin/img/bjtp.jpg") no-repeat;
            background-size: 100% 100%;

        }
        .body{
            width: 100%;
            background: url("<%=basePath%>docdorLogin/img/bodybjt.jpg") no-repeat;
            height: 600px;
            background-size: 100% 100%;
            opacity:0.5;
        }
        .head span{
            font-size: 40px;
            color: whitesmoke;
        }
        .head span,img{
            vertical-align:middle;
        }
        .biao-body{
            margin: auto;
            /*text-align: center;*/
            width: 500px;
            background: white;
            height: 300px;
            margin-top: 50px;
            border: 5px solid #9F9F9F;
            padding-top: 50px;

        }
        #biao{
            font-size: 20px;
        }
        .text{
            width: 200px;
            height: 30px;
        }
        h1{
            position: relative;
            top: 50px;
            text-align: center;
            color: #2D93CA;
            font-size: 50px;
        }
        #yz,#yz2{
            font-size: 12px;
        }
        form{
            margin-left: 100px;
        }
        #anniu{
            width: 200px;
            height: 50px;
            font-size: 20px;
            margin-left: 50px;
            border-radius: 10px 10px 10px 10px;
            background: #2D93CA;
            color: white;
        }
        ul li span{
            color: #9F9F9F;
            font-family: "微软雅黑";
            font-size: 13px;
        }
        ul li h3{
            margin-bottom: 0;
            margin-top: 20px;
        }
        ul{
            margin-top: 50px;
            margin-left: 80px;
        }

        ul img{
            margin-left: 20px;
            margin-right: 20px;
        }
        ul li{
            list-style: none;
            float: left;
            margin-left: 5px;
        }
    </style>
    <link rel="shortcut icon" href="#"/>
    <link rel="icon" type="image/x-icon" href="<%=basePath%>docdorLogin/img/huazi.ico"/>
</head>
<body>
    <div class="head">
            <img src="<%=basePath%>docdorLogin/img/logo.png"   height="150px"><span> · 湖南省长沙省华子医院 | 找回密码</span>
    </div>
    <div class="body">
        <h1> <img src="<%=basePath%>docdorLogin/img/yz.png"   height="60px" width="60px"> 验证信息</h1><br>
        <div class="biao-body">
            <form action="<%=basePath%>loginn?tp=updatePwd" method="post" id="biao">
            <p>用 户 名 ：<input type="text" name="doctorId" class="text" placeholder=" 用户名" id="id"></p><br>
            <p>身 份 证 ：<input type="text" name="sfz" class="text" placeholder=" 身份证" id="sfz"> <span id="yz"></span></p><br>
            <p>新 密 码 ：<input type="password" name="pwd" class="text" placeholder=" 密码" id="pwd2"></p><br>
            <p>确认密码：<input type="password" name="pwd2" class="text" placeholder=" 密码" id="pwd"><span id="yz2"></span></p><br>
               <p><input type="submit" value="确定修改" id="anniu"></p>
            </form>
        </div>
    </div>
    <ul>
        <li><img src="<%=basePath%>docdorLogin/img/hg.png" width="80px" height="80px"></li>
        <li class="yang">
            <h3>专业的平台</h3>
            <span>三甲医院号源直供、服务挂号上亿人次</span>
        </li>
        <li><img src="<%=basePath%>docdorLogin/img/ys.png" width="70px" height="70px"></li>
        <li class="yang">
            <h3>知名医生</h3>
            <span>知名医疗资源、精诚解决您的疑难杂症</span>
        </li>
        <li><img src="<%=basePath%>docdorLogin/img/xx.png" width="70px" height="70px"></li>
        <li class="yang">
            <h3>权威的问诊</h3>
            <span>多样化问诊模式、快速精准解答问题</span>
        </li>
        <li><img src="<%=basePath%>docdorLogin/img/jk.png" width="70px" height="70px"></li>
        <li class="yang">
            <h3>全面健康医院</h3>
            <span>要么不来、要么活着回去~华子医院</span>
        </li>
    </ul>
    <script type="text/javascript" src="<%=basePath%>jquery/jquery-1.12.4.js"></script>
    <script type="text/javascript">
            $(function () {
                $("#sfz").blur(function () {
                    let doctorId=$("#id").val();
                    let sfz=$("#sfz").val();
                    $.ajax(
                        {
                            url:"<%=basePath%>loginn",
                            data:{
                                doctorId:doctorId,
                                sfz:sfz,
                                tp:"selectSfz"
                            },
                            type:"post",
                            dataType:"json",
                            success:function (data) {
                                    if (data){
                                     $("#yz").text("验证成功").css("color","green");
                                    }else {
                                        $("#yz").text("验证失败").css("color","red");
                                    }
                            }
                        });
                })
                $("#pwd").blur(function () {
                        let pwd=$("#pwd2").val();
                        let pwd2=$("#pwd").val();
                        if(pwd==pwd2){
                            $("#yz2").text("").css("color","red");
                        }else {
                            $("#yz2").text("两次密码不一样").css("color","red");
                        }
                })


            })
    </script>
</body>
</html>